Main: GOSUB Mail CHAIN "df0:Menus",10,ALL Modem: IF rings=0 THEN OtherModem x=FRE(0) FOR j= 1 TO LEN(a$):p$=MID$(a$,j,1) PRINT p$;:PRINT#1,p$;:NEXT j a$="":p$="":RETURN OtherModem: x=FRE(0) FOR j= 1 TO LEN(a$):p$=MID$(a$,j,1) PRINT p$;:NEXT j a$="":p$="":RETURN Answers: telly=0:t$="":t=0:i$="":ch$="":alter=0:IF rings=0 THEN SomeAnswers WHILE 1 AND alter<1 WHILE LOC(1)<>0 ch$=INPUT$(1,1) equivs=ASC(ch$) AND 127:IF equivs<>1 THEN ch$=CHR$(equivs) i$=i$+ch$:equivs=0 telly=telly+1:IF telly=78 THEN ch$=r$ IF ch$=CHR$(8) AND LEN(i$)>=2 THEN i$=LEFT$(i$,LEN(i$)-2):telly=telly-1 IF ch$=CHR$(10) OR ch$=CHR$(13) OR ch$=r$ THEN alter=3:telly=0 a$=ch$:GOSUB Modem:ch$="" WEND ch$=INKEY$:i$=i$+ch$ a$=ch$:GOSUB Modem IF ch$=CHR$(10) OR ch$=CHR$(13) OR ch$=r$ THEN telly=0:GOTO MoreAnswers IF ch$=CHR$(8) AND LEN(i$)>=2 THEN i$=LEFT$(i$,LEN(i$)-2) ch$="":IF LEN(i$)=0 THEN connect=PEEK (&Hbfd*&H1000+&H0):IF connect<>0 THEN okp=0:RETURN WEND IF i$<>"" THEN MoreAnswers SomeAnswers: ch$=INKEY$:i$=i$+ch$:a$=ch$:GOSUB Modem IF ch$= CHR$(10) OR ch$=CHR$(13) OR ch$=r$ THEN MoreAnswers IF ch$=CHR$(8) AND LEN(i$)>=2 THEN i$=LEFT$(i$,LEN(i$)-2) ch$="" GOTO SomeAnswers MoreAnswers: IF okp<>1 THEN RETURN IF i$="" THEN ch$="":GOTO Answers t$=i$:IF LEN(t$)>80 THEN t$=LEFT$(t$,78)+r$ RETURN SeqRead: ERASE ABCS$:DIM ABCS$(185) a$=r$+r$+"[> K Quits <]"+r$+r$:GOSUB Modem OPEN "I", #3, file$ ReadSeq: j=0:L=0:k=0:Countl=0 WHILE NOT EOF(3) x=FRE(0):j=j+1 LINE INPUT#3,ABCS$(j):ABCS$(j)=ABCS$(j)+r$ WEND CLOSE#3:k=j:L=0:Detect=0 WHILE L0 ch$=INPUT$(1,1):equivs=ASC(ch$) AND 127:IF equivs<>1 THEN ch$=CHR$(equivs) i$=i$+ch$:equivs=0:a$=ch$:GOSUB Modem WEND IF i$<>"" THEN MoreCheckSeq SomeCheckSeq: ch$=INKEY$:i$=i$+ch$:a$=ch$:GOSUB Modem OtherCheckSeq: IF Detect=1 GOTO MoreCheckSeq Countl=Countl+1:IF Countl=24 THEN a$=r$+"More (y,n,c)?":GOSUB A1 IF Countl=24 THEN MenS$=UCASE$(LEFT$(t$,1)):IF MenS$="N" THEN L=k+1 IF Countl=24 AND MenS$="Y" THEN Countl=0 IF Countl=24 AND MenS$="C" THEN Detect=1 IF Countl=24 AND Detect<>1 THEN Countl=0 MoreCheckSeq: IF i$=CHR$(75) OR i$=CHR$(107) THEN L=k+1 WEND RETURN A1: GOSUB Modem:GOSUB Answers:RETURN Mail: IF okp<>1 THEN RETURN GOSUB CheckConTime:IF okp<>1 THEN RETURN a$=r$+"Mail:":GOSUB A1:MenS$=UCASE$(LEFT$(t$,1)) IF MenS$="S" THEN MailScan IF MenS$="R" THEN MailRead IF MenS$="P" THEN Acd=0:GOSUB PostMail:GOTO Mail IF MenS$="?" THEN file$="df1:mails/mailmenu":GOSUB SeqRead:GOTO Mail IF MenS$="X" THEN RETURN a$=r$+"No such command.":GOSUB Modem:GOTO Mail MailScan: IF eM=0 THEN a$=r$+"You don't have any mail.":GOSUB Modem:GOTO Mail file$=Name1$+Name2$:GOSUB SpaceDelete IF Email$(1)="1" THEN OPEN "I",#3,"df1:mails/"+file$+"1":FOR j=1 TO 2:LINE INPUT#3, ABCS$(j):NEXT j:CLOSE#3:a$=r$+ABCS$(1)+r$+ABCS$(2)+r$+r$:GOSUB Modem IF Email$(2)="1" THEN OPEN "I",#3,"df1:mails/"+file$+"2":FOR j=1 TO 2:LINE INPUT#3, ABCS$(j):NEXT j:CLOSE#3:a$=r$+ABCS$(1)+r$+ABCS$(2)+r$+r$:GOSUB Modem IF Email$(3)="1" THEN OPEN "I",#3,"df1:mails/"+file$+"3":FOR j=1 TO 2:LINE INPUT#3, ABCS$(j):NEXT j:CLOSE#3:a$=r$+ABCS$(1)+r$+ABCS$(2)+r$+r$:GOSUB Modem IF Email$(4)="1" THEN OPEN "I",#3,"df1:mails/"+file$+"4":FOR j=1 TO 2:LINE INPUT#3, ABCS$(j):NEXT j:CLOSE#3:a$=r$+ABCS$(1)+r$+ABCS$(2)+r$+r$:GOSUB Modem IF Email$(5)="1" THEN OPEN "I",#3,"df1:mails/"+file$+"5":FOR j=1 TO 2:LINE INPUT#3, ABCS$(j):NEXT j:CLOSE#3:a$=r$+ABCS$(1)+r$+ABCS$(2)+r$+r$:GOSUB Modem CLOSE#3:GOTO Mail MailRead: IF eM=0 THEN a$=r$+"You don't have any mail.":GOSUB Modem:GOTO Mail IF Email$(1)="1" THEN file$="df1:mails/"+Name1$+" "+Name2$+"1":lab=1:GOSUB SpaceDelete:GOSUB SeqRead:mfile$=file$:GOSUB MoreMailRead IF Email$(2)="1" THEN file$="df1:mails/"+Name1$+" "+Name2$+"2":lab=2:GOSUB SpaceDelete:GOSUB SeqRead:mfile$=file$:GOSUB MoreMailRead IF Email$(3)="1" THEN file$="df1:mails/"+Name1$+" "+Name2$+"3":lab=3:GOSUB SpaceDelete:GOSUB SeqRead:mfile$=file$:GOSUB MoreMailRead IF Email$(4)="1" THEN file$="df1:mails/"+Name1$+" "+Name2$+"4":lab=4:GOSUB SpaceDelete:GOSUB SeqRead:mfile$=file$:GOSUB MoreMailRead IF Email$(5)="1" THEN file$="df1:mails/"+Name1$+" "+Name2$+"5":lab=5:GOSUB SpaceDelete:GOSUB SeqRead:mfile$=file$:GOSUB MoreMailRead a$=r$+"No More Mail.":GOSUB Modem:GOTO ExitMailRead MoreMailRead: a$=r$+"[R]eply [D]elete [N]ext e[X]it :":GOSUB A1 MenS$=UCASE$(LEFT$(t$,1)) IF MenS$="D" THEN KILL mfile$:KILL mfile$+".info":eM=eM-1:Email$(lab)="0":GOTO MailRead IF MenS$="X" THEN ExitMailRead IF MenS$="N" THEN RETURN IF MenS$="R" THEN Acd=1:GOSUB PostMail:GOTO MoreMailRead GOTO MoreMailRead PostMail: IF Acd=1 THEN file$=ABCS$(2):GOSUB OtherSpaceDelete:RecipID$=file$:RecipID=VAL(RecipID$):GOTO MorePostMail a$=r$+"Send to Whom?":GOSUB A1:Recip$=UCASE$(LEFT$(t$,LEN(t$)-1)):Recip$=Recip$+"=" IF LEN(Recip$)>25 THEN Recip$=LEFT$(Recip$,25) RecipnaMe=LEN(Recip$) Ddt=0:Dch=0 WHILE Ddt<1 Dch=Dch+1:uil$=STR$(Dch):uil$=RIGHT$(uil$,1) OPEN "I",#3,"df1:Storehouse"+uil$ Dxq=0:Lmn=0:Dab=0 WHILE NOT EOF(3) Dxq=Dxq+1 LINE INPUT#3, ABCS$(Dxq) WEND Dzz=0 WHILE Lmn<1 Dzz=Dzz+1 IF Recip$=LEFT$(ABCS$(Dzz),RecipnaMe) THEN Lmn=5:Dab=Dzz IF Dzz=Dxq AND Lmn<>5 THEN Lmn=2 WEND IF Lmn=5 THEN Ddt=5:RecipID$=RIGHT$(ABCS$(Dab),LEN(ABCS$(Dab))-RecipnaMe) IF Lmn=2 AND Dch=6 THEN Ddt=3 CLOSE#3 WEND IF Ddt=3 THEN a$=r$+"No Such User!":GOSUB Modem:RETURN RecipID=VAL(RecipID$) a$=r$+"Subject:":GOSUB A1:Subject$=UCASE$(LEFT$(t$,LEN(t$)-1)) IF LEN(Subject$)>30 THEN Subject$=LEFT$(Subject$,30) ABCS$(1)="Time:"+TIME$+" "+"Date:"+DATE$ Recip$=LEFT$(Recip$,LEN(Recip$)-1) ABCS$(2)="Name:"+Name1$+" "+Name2$+" Subject:"+Subject$+" ID:"+UserID$ MorePostMail: IF Acd=1 THEN ABCS$(1)="Time:"+TIME$+" "+"Date:"+DATE$ CLOSE#4:OPEN "R", #4, "df1:USER",120 FIELD #4, 1 AS check$,9 AS N1$,15 AS N2$,10 AS Co$,15 AS Adr$,10 AS CI$,10 AS STA$,3 AS AG$,9 AS PAS$,3 AS B1$,3 AS B2$,3 AS B3$,3 AS B4$,3 AS B5$,3 AS B6$,3 AS B7$,3 AS B8$,3 AS B9$,1 AS EM1$,1 AS EM2$,1 AS EM3$,1 AS EM4$,1 AS EM5$,3 AS Valu$ FIELD #4, 117 AS dump$,1 AS VTE1$,1 AS VTE2$,1 AS VTE3$ GET#4,RecipID:lab=0:Ddt=0 IF Acd=1 THEN Recip$=N1$+" "+N2$ IF Acd=1 THEN ABCS$(2)="Name:"+Name1$+" "+Name2$+" Subject:Reply ID:"+UserID$ IF EM1$="0" THEN lab=1:GOTO PostMoreMail IF EM2$="0" THEN lab=2:GOTO PostMoreMail IF EM3$="0" THEN lab=3:GOTO PostMoreMail IF EM4$="0" THEN lab=4:GOTO PostMoreMail IF EM5$="0" THEN lab=5:GOTO PostMoreMail a$=r$+"Sorry "+Recip$+"'s Mailbox is full.":GOSUB Modem:CLOSE#4:RETURN PostMoreMail: ABCS$(3)=r$ a$=r$+"Enter Message: [Max. 40 lines] /EX to exit"+r$:GOSUB Modem Extm=0:Ddt=3 WHILE Extm<1 Ddt=Ddt+1 a$=r$+STR$(Ddt-3)+":":GOSUB A1 ABCS$(Ddt)=t$ IF UCASE$(LEFT$(t$,3))="/EX" THEN Extm=1:Ddt=Ddt-1 IF Ddt=42 THEN a$=r$+"Last Line!":GOSUB Modem IF Ddt=43 THEN Extm=1 WEND QueryPostMail: a$=r$+"S- Save L- List A- Abort R- Replace D- Delete I- Insert C- Continue :":GOSUB A1 MenS$=UCASE$(LEFT$(t$,1)) IF MenS$="S" THEN SavePostMail IF MenS$="L" THEN ListPostMail IF MenS$="A" THEN CLOSE#2:CLOSE#4:RETURN IF MenS$="R" THEN EditPostMail IF MenS$="D" THEN DeletePostMail IF MenS$="I" THEN InsertPostMail IF MenS$="C" THEN ContinuePostMail GOTO QueryPostMail SavePostMail: Recip$=Recip$+RIGHT$(STR$(lab),1):file$=Recip$:GOSUB SpaceDelete Recip$=file$ OPEN "O",#3,"Df1:mails/"+Recip$ FOR j=1 TO Ddt PRINT#3,ABCS$(j) NEXT j:CLOSE#3:Acd=0 IF lab=1 THEN LSET EM1$="1":PUT#4,RecipID:CLOSE#4:RETURN IF lab=2 THEN LSET EM2$="1":PUT#4,RecipID:CLOSE#4:RETURN IF lab=3 THEN LSET EM3$="1":PUT#4,RecipID:CLOSE#4:RETURN IF lab=4 THEN LSET EM4$="1":PUT#4,RecipID:CLOSE#4:RETURN IF lab=5 THEN LSET EM5$="1":PUT#4,RecipID:CLOSE#4:RETURN ListPostMail: a$=r$+"Starting Line No.:":GOSUB A1:t$=LEFT$(t$,2):stln=VAL(t$)+3:IF stln<3 OR stln>Ddt THEN ListPostMail a$=r$+"Ending Line No.:":GOSUB A1:t$=LEFT$(t$,2):Eln=VAL(t$)+3:IF ElnDdt THEN Eln=Ddt FOR L=stln TO Eln a$=STR$(L-3)+":"+ABCS$(L):GOSUB Modem NEXT L GOTO QueryPostMail EditPostMail: a$=r$+"Line Number to Replace:":GOSUB A1:t$=LEFT$(t$,2):Rln=VAL(t$)+3:IF Rln<4 OR Rln>Ddt THEN EditPostMail a$=r$+"Replace:"+r$+ABCS$(Rln)+r$+"With:"+r$+":":GOSUB A1 IF t$=CHR$(10) OR t$=CHR$(13) OR t$=r$ THEN a$=r$+"Edit Aborted.":GOSUB Modem:GOTO QueryPostMail ABCS$(44)=t$ a$=r$+"Replace:"+r$+ABCS$(Rln)+r$+"With:"+r$+ABCS$(44)+r$+"(Y or N):":GOSUB A1:MenS$=UCASE$(LEFT$(t$,1)) IF MenS$="N" THEN QueryPostMail IF MenS$="Y" THEN ABCS$(Rln)=ABCS$(44):GOTO QueryPostMail ExitMailRead: CLOSE#2:OPEN "R", #2, "df1:USER",120 FIELD #2, 1 AS check$,9 AS N1$,15 AS N2$,10 AS Co$,15 AS Adr$,10 AS CI$,10 AS STA$,3 AS AG$,9 AS PAS$,3 AS B1$,3 AS B2$,3 AS B3$,3 AS B4$,3 AS B5$,3 AS B6$,3 AS B7$,3 AS B8$,3 AS B9$,1 AS EM1$,1 AS EM2$,1 AS EM3$,1 AS EM4$,1 AS EM5$,3 AS Valu$ FIELD #2, 117 AS dump$,1 AS VTE1$,1 AS VTE2$,1 AS VTE3$ GET#2,UserID LSET EM1$=Email1$ LSET EM2$=Email2$ LSET EM3$=Email3$ LSET EM4$=Email4$ LSET EM5$=Email5$ PUT#2,UserID CLOSE#2:GOTO Mail CheckConTime: ContiMe$=TIME$:ChEntTime$=RIGHT$(EnttiMe$,5):ContiMe$=RIGHT$(ContiMe$,5) ContiMe=VAL(ContiMe$):EnttiMe=VAL(ChEntTime$) IF ContiMe-EnttiMe>30 AND Veru$="000" THEN okp=0:a$=r$+"Time limit exceeded."+r$:GOSUB Modem:RETURN IF ContiMe-EnttiMe>45 AND Veru$="007" THEN okp=0:a$=r$+"Time limit exceeded."+r$:GOSUB Modem:RETURN okp=1:RETURN InsertPostMail: IF Ddt>=199 THEN a$=r$+"No room to insert.":GOSUB Modem:GOTO QueryPostMail a$=r$+"Insert before which line:":GOSUB A1:IF t$=CHR$(10) OR t$=CHR$(13) THEN QueryPostMail instln=VAL(t$)+3 FOR j=Ddt TO instln STEP -1 ABCS$(j+1)=ABCS$(j) NEXT j ABCS$(instln)=" "+r$:Ddt=Ddt+1 GOTO QueryPostMail DeletePostMail: a$=r$+"Delete starting which line:":GOSUB A1:IF t$=CHR$(10) OR t$=CHR$(13) THEN QueryPostMail stln=VAL(t$)+3:IF stln<4 OR stln>Ddt THEN QueryPostMail a$=r$+"Ending which line:":GOSUB A1:endtln=VAL(t$)+3:IF endtln>Ddt THEN endtln=Ddt IF stln>endtln THEN elsie=stln:stln=endtln:endtln=elsie a$=r$+"Delete from"+STR$(stln-3)+" to"+STR$(endtln-3)+r$+"Are you sure? (Y or N):":GOSUB A1:MenS$=UCASE$(LEFT$(t$,1)) IF MenS$="N" THEN QueryPostMail FOR j=endtln+1 TO Ddt ABCS$(j-((endtln+1)-stln))=ABCS$(j) NEXT j Ddt=Ddt-((endtln+1)-stln) FOR j=Ddt TO Ddt+((endtln+1)-stln) ABCS$(j)=" "+r$ NEXT j GOTO QueryPostMail ContinuePostMail: IF Ddt>198 THEN a$=r$+"No Room!":GOTO QueryPostMail Dzz=0 a$=r$+"Enter Text: [Max. 197 lines] /EX to Exit":GOSUB Modem WHILE Dzz<1 Ddt=Ddt+1 a$=r$+STR$(Ddt-3)+":":GOSUB A1:ABCS$(Ddt)=t$ IF UCASE$(LEFT$(t$,3))="/EX" THEN Dzz=1:Ddt=Ddt-1 IF Ddt=199 THEN a$=r$+"Last Line!":GOSUB Modem IF Ddt=200 THEN Dzz=1 WEND GOTO QueryPostMail SpaceDelete: x$=file$:tfile$="" FOR j= 1 TO LEN(x$):p$=MID$(x$,j,1) ght=ASC(p$+CHR$(1)) tfile$=tfile$+CHR$(ght) IF ght<2 OR ght=32 THEN tfile$=LEFT$(tfile$,LEN(tfile$)-1) NEXT j file$=tfile$ RETURN OtherSpaceDelete: x$=RIGHT$(file$,4):tfile$="" FOR j= 1 TO LEN(x$):p$=MID$(x$,j,1) ght=ASC(p$+CHR$(1)) tfile$=tfile$+CHR$(ght) IF ght<48 OR ght>57 THEN tfile$=LEFT$(tfile$,LEN(tfile$)-1) NEXT j file$=tfile$ RETURN